// import Login from "@/views/Login"
// import Home from "@/views/Home"
// import ProductMgr from "@/views/product/ProductMgr"
// import ProductCate from "@/views/product/ProductCate"
// import ProductComment from "@/views/product/ProductComment"
// import ProductSpec from "@/views/product/ProductSpec"
// import OrderMgr from "@/views/order/OrderMgr"
// import React from 'react'
// const Login=React.lazy(()=>import('@/views/Login'))
// const Home=React.lazy(()=>import('@/views/Home'))
// const ProductMgr=React.lazy(()=>import('@/views/product/ProductMgr'))
// const ProductCate=React.lazy(()=>import('@/views/product/ProductCate'))
// const ProductComment=React.lazy(()=>import('@/views/product/ProductComment'))
// const ProductSpec=React.lazy(()=>import('@/views/product/ProductSpec'))
// const OrderMgr=React.lazy(()=>import('@/views/order/OrderMgr'))

import withLoadable from '@/hoc/loadable'
const Login=withLoadable(()=>import('@/views/Login'))
const Home=withLoadable(()=>import('@/views/Home'))
const ProductMgr=withLoadable(()=>import('@/views/product/ProductMgr'))
const ProductCate=withLoadable(()=>import('@/views/product/ProductCate'))
const ProductComment=withLoadable(()=>import('@/views/product/ProductComment'))
const ProductSpec=withLoadable(()=>import('@/views/product/ProductSpec'))
const OrderMgr=withLoadable(()=>import('@/views/order/OrderMgr'))
const routes=[
    {
        path:'/login',
        element:<Login/>
    },
    {
        path:'/',
        element:<Home/>,
        children:[
            {
                path:'productMgr',
                element:<ProductMgr/>
            },
            {
                path:'productCate',
                element:<ProductCate/>
            },
            {
                path:'productComment',
                element:<ProductComment/>
            },
            {
                path:'productSpec',
                element:<ProductSpec/>
            },
            {
                path:'orderMgr',
                element:<OrderMgr/>
            }
        ]
    }
]
export default routes